﻿
using NLite.Collections;
namespace NLite.Internal
{
    class PropertySetOriginator
    {
        public PropertySetOriginator(IPropertySet state)
        {
            State = state;
        }


        public IPropertySet State { get; private set; }

        

        public IPropertySet CreateMemento()
        {
            return new PropertySet(State);
        }

        public void RestoreMemento(IPropertySet memento)
        {
            State.Clear();
            State.AddRange(memento);
        }
    }
}
